/*
 * Copyright Redis Ltd. 2018 - present
 * Licensed under your choice of the Redis Source Available License 2.0 (RSALv2) or
 * the Server Side Public License v1 (SSPLv1).
 */

#pragma once

#define EMSG_EMPTY_KEY "Encountered an empty key when opened key %s"
#define EMSG_NON_GRAPH_KEY "Encountered a non-graph value type when opened key %s"
#define EMSG_DIFFERENT_VALUE "Encountered different graph value when opened key %s"
#define EMSG_ACCESS_VAR "Attempted to access variable before it has been defined"
#define EMSG_INVALID_NUMERIC "Invalid numeric value '%s'"
#define EMSG_INTEGER_OVERFLOW "Integer overflow '%s'"
#define EMSG_FLOAT_OVERFLOW "Float overflow '%s'"
#define EMSG_UNHANDLED_TYPE_MAP_PROJECTION "Encountered unhandled type when trying to read map projection identifier"
#define EMSG_SHORTESTPATH_SINGLE_RELATIONSHIP "shortestPath requires a path containing a single relationship"
#define EMSG_SHORTESTPATH_MINIMAL_LENGTH "shortestPath does not support a minimal length different from 0 or 1"
#define EMSG_SHORTESTPATH_MAX_HOPS "Maximum number of hops must be greater than or equal to minimum number of hops"
#define EMSG_SHORTESTPATH_UNDIRECTED "RedisGraph does not currently support undirected shortestPath traversals"
#define EMSG_SHORTESTPATH_RELATIONSHIP_FILTERS "RedisGraph does not currently support filters on relationships in shortestPath"
#define EMSG_SHORTESTPATH_NODE_FILTERS "Node filters may not be introduced in shortestPath"
#define EMSG_FUNCTION_REQUIER_PREDICATE "'%s' function requires a WHERE predicate"
#define EMSG_NESTED_AGGREGATION "Can't use aggregate functions inside of aggregate functions."
#define EMSG_FUNCTION_MIN_ARGS "Received %d arguments to function '%s', expected at least %d"
#define EMSG_FUNCTION_MAX_ARGS "Received %d arguments to function '%s', expected at most %d"
#define EMSG_MISSING_RECORD "_AR_EXP_UpdateEntityIdx: No record was given to locate a value with alias %s"
#define EMSG_MISSING_VALUE "_AR_EXP_UpdateEntityIdx: Unable to locate a value with alias %s within the record"
#define EMSG_MISSING_PARAMETERS "Missing parameters"
#define EMSG_PREC_INPUT_RANGE "Invalid input - '%f' is not a valid argument, must be a number in the range 0.0 to 1.0"
#define EMSG_NODE_DEGREE_ARGUMENTS "Received %d arguments, expected at most 2 because second argument is List"
#define EMSG_MUST_BE_NON_NEGATIVE "%s must be a non-negative integer"
#define EMSG_INVALID_REGEX "Invalid regex, err=%s"
#define EMSG_INVALIDE_NOT_USAGE "Invalid usage of 'NOT' filter with expressions on left and right sides."
#define EMSG_RETURN_STAR_NO_VARIABLES "RETURN * is not allowed when there are no variables in scope"
#define EMSG_WITH_PROJ_MISSING_ALIAS "WITH clause projections must be aliased"
#define EMSG_SAME_RESULT_COLUMN_NAME "Error: Multiple result columns with the same name are not supported."
#define EMSG_VAR_LEN_INVALID_RANGE "Variable length path, maximum number of hops must be greater or equal to minimum number of hops."
#define EMSG_VAR_LEN "Variable length relationships cannot be used in %s"
#define EMSG_REDECLARE "The bound %s '%s' can't be redeclared in a %s clause"
#define EMSG_ONE_RELATIONSHIP_TYPE "Exactly one relationship type must be specified for each relation in a %s pattern."
#define EMSG_NOT_DEFINED_LEN "'%.*s' not defined"
#define EMSG_NOT_DEFINED "'%s' not defined"
#define EMSG_UNKNOWN_FUNCTION "Unknown function '%s'"
#define EMSG_INVALID_USE_OF_AGGREGATION_FUNCTION "Invalid use of aggregating function '%s'"
#define EMSG_INVALID_USAGE_OF_STAR_PARAMETER "COUNT is the only function which can accept * as an argument"
#define EMSG_INVALID_USAGE_OF_DISTINCT_STAR_PARAMETER "Cannot specify both DISTINCT and * in COUNT(DISTINCT *)"
#define EMSG_MISSING_EVAL_EXP_IN_REDUCE "No eval expression given in reduce"
#define EMSG_UNHANDLED_TYPE_INLINE_PROPERTIES "Encountered unhandled type in inlined properties."
#define EMSG_CREATE_DIRECTED_RELATIONSHIP "Only directed relationships are supported in CREATE"
#define EMSG_SAME_ALIAS_NODE_RELATIONSHIP "The alias '%s' was specified for both a node and a relationship."
#define EMSG_SAME_ALIAS_MULTIPLE_PATTERNS "Cannot use the same relationship variable '%s' for multiple patterns."
#define EMSG_SHORTESTPATH_BOUND_NODES "A shortestPath requires bound nodes"
#define EMSG_ALLSHORTESTPATH_MINIMAL_LENGTH "allShortestPaths(...) does not support a minimal length different from 1"
#define EMSG_LIMIT_MUST_BE_NON_NEGATIVE "LIMIT specified value of invalid type, must be a positive integer"
#define EMSG_SKIP_MUST_BE_NON_NEGATIVE "SKIP specified value of invalid type, must be a positive integer"
#define EMSG_UNION_MISSING_RETURNS "Found %d UNION clauses but only %d RETURN clauses."
#define EMSG_UNION_MISMATCHED_RETURNS "All sub queries in a UNION must have the same column names."
#define EMSG_PROCEDURE_NOT_REGISTERED "Procedure `%s` is not registered"
#define EMSG_PROCEDURE_INVALID_ARGUMENTS "Procedure `%s` requires %d arguments, got %d"
#define EMSG_VAIABLE_ALREADY_DECLARED "Variable `%s` already declared"
#define EMSG_PROCEDURE_INVALID_OUTPUT "Procedure `%s` does not yield output `%s`"
#define EMSG_CALLSUBQUERY_INVALID_REFERENCES "WITH imports in CALL {} must consist of only simple references to outside variables"
#define EMSG_VAIABLE_ALREADY_DECLARED_IN_OUTER_SCOPE "Variable `%s` already declared in outer scope"
#define EMSG_DELETE_INVALID_ARGUMENTS "DELETE can only be called on nodes, paths and relationships"
#define EMSG_SET_LHS_NON_ALIAS "RedisGraph does not currently support non-alias references on the left-hand side of SET expressions"
#define EMSG_UNION_COMBINATION "Invalid combination of UNION and UNION ALL."
#define EMSG_FOREACH_INVALID_BODY "Error: Only updating clauses may reside in FOREACH"
#define EMSG_QUERY_INVALID_LAST_CLAUSE "Query cannot conclude with %s (must be a RETURN clause, an update clause, a procedure call or a non-returning subquery)"
#define EMSG_UNEXPECTED_CLAUSE_FOLLOWING_RETURN "Unexpected clause following RETURN"
#define EMSG_QUERY_CANNOT_BEGIN_WITH "Query cannot begin with '%s *'."
#define EMSG_MISSING_WITH "A WITH clause is required to introduce %s after an updating clause."
#define EMSG_MISSING_WITH_AFTER_MATCH "A WITH clause is required to introduce a MATCH clause after an OPTIONAL MATCH."
#define EMSG_UNSUPPORTED_QUERY_TYPE "Encountered unsupported query type '%s'"
#define EMSG_EMPTY_QUERY "Error: empty query."
#define EMSG_ALLSHORTESTPATH_SUPPORT "RedisGraph support allShortestPaths only in match clauses"
#define EMSG_SHORTESTPATH_SUPPORT "RedisGraph currently only supports shortestPaths in WITH or RETURN clauses"
#define EMSG_EXPLAIN_PROFILE_USAGE "Please use GRAPH.%s 'key' 'query' command instead of GRAPH.QUERY 'key' '%s query'"
#define EMSG_DUPLICATE_PARAMETERS "Duplicated parameter: %s"
#define EMSG_PARSER_ERROR "errMsg: %s line: %u, column: %u, offset: %zu errCtx: %s errCtxOffset: %zu"
#define EMSG_QUERY_WITH_MULTIPLE_STATEMENTS "Error: query with more than one statement is not supported."
#define EMSG_QUERY_TIMEOUT "Query timed out"
#define EMSG_UNABLE_TO_DROP_INDEX "ERR Unable to drop index on :%s(%s): no such index."
#define EMSG_UNKNOWN_EXECUTION_TYPE "ERR Encountered unknown query execution type."
#define EMSG_MISUSE_GRAPH_ROQUERY "graph.RO_QUERY is to be executed only on read-only queries"
#define EMSG_COULD_NOT_PARSE_QUERY "Error: could not parse query"
#define EMSG_UNABLE_TO_RESOLVE_FILTER_ALIAS "Unable to resolve filtered alias '%s'"
#define EMSG_TYPE_MISMATCH "Type mismatch: expected %s but was %s"
#define EMSG_REDISGRAPH_SUPPORT "RedisGraph does not currently support %s"
#define EMSG_INVALID_PROPERTY_VALUE "Property values can only be of primitive types or arrays of primitive types"
#define EMSG_DIVISION_BY_ZERO "Division by zero"
#define EMSG_ALLSHORTESTPATH_SRC_DST_RESLOVED "Source and destination must already be resolved to call allShortestPaths"
#define EMSG_DELETE_OPERATE_ON_CHILD "Delete was constructed without a child operation"
#define EMSG_OPERATE_ON_NON_NEGATIVE_INT "%s operates only on non-negative integers"
#define EMSG_EXPECTED_BOOLEAN_PREDICATE "Expected boolean predicate."
#define EMSG_FILTER_INVALID_COMPARISON "Filter predicate did not compare two expressions."
#define EMSG_EMPTY_FILTER "Empty filter condition."
#define EMSG_INVALID_NOT_USAGE "Invalid usage of 'NOT' filter."
#define EMSG_ACCESS_UNDEFINED_ATTRIBUTE "Attempted to access undefined attribute"
#define EMSG_IS_MISSING "%s is missing"
#define EMSG_INDEX_ALREADY_EXISTS "Index already exists configuration can't be changed"
#define EMSG_MUST_BE "%s must be %s"
#define EMSG_NOT_SUPPORTED "%s is not supported"
#define EMSG_FULLTEXT_MIN_ARGS "Minimum number of arguments is 2"
#define EMSG_FULLTEXT_LABEL_TYPE "Label argument can be string or map"
#define EMSG_FULLTEXT_FIELD_TYPE "Field argument must be string or map"
#define EMSG_FULLTEXT_DROP_INDEX "ERR Unable to drop index on :%s: no such index."
#define EMSG_REDISEARCH "RediSearch: %s"
#define EMSG_MANDATORY_CONSTRAINT_VIOLATION_NODE "mandatory constraint violation: node with label %s missing property %s"
#define EMSG_MANDATORY_CONSTRAINT_VIOLATION_EDGE "mandatory constraint violation: edge with relationship-type %s missing property %s";
#define EMSG_UNIQUE_CONSTRAINT_VIOLATION_NODE "unique constraint violation on node of type %s"
#define EMSG_UNIQUE_CONSTRAINT_VIOLATION_EDGE "unique constraint violation, on edge of relationship-type %s"
#define EMSG_SPPATH_REQUIRED "sourceNode and targetNode are required"
#define EMSG_SPPATH_INVALID_TYPE "sourceNode and targetNode must be of type Node"
#define EMSG_REL_DIRECTION "relDirection values must be 'incoming', 'outgoing' or 'both'"
#define EMSG_SSPATH_REQUIRED "sourceNode is required"
#define EMSG_SSPATH_INVALID_TYPE "sourceNode must be of type Node"
#define EMSG_INDEX_SUPPORT_CONSTRAINTS "Index supports constraint"
#define EMSG_QUERY_MEM_CONSUMPTION "Query's mem consumption exceeded capacity"
